﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Security;
using ClientSite2nd.Logic;
using ClientSite2nd.Models;

namespace ClientSite2nd.Controllers
{
    public class HomeController : Controller
    {
        private Currencies _currencies = new Currencies();
        private ClientContext _db=new ClientContext();

        [Authorize]
        public ActionResult Index()
        {
           /* var user = Membership.GetUser();
            var sessionUser = SessionWrapper.CurrentClient;
            if ((user != null) && (sessionUser == null))
            {
                SessionWrapper.CurrentClient =
                    _db.Clients.SingleOrDefault(c => c.Id == (Guid) Membership.GetUser().ProviderUserKey);
            }*/
                ViewBag.Message = SessionWrapper.CurrentClient.Company;
                return View(_currencies.All);
        }
    }
}
